package com.yimi.yinhepda.views.stockCheck_module;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;

import com.pda.ym.base.BaseActivity;
import com.yimi.yinhepda.R;

/**
 * 库存盘点，包括盘点任务列表，盘点差异报告
 *
 * @author 000432
 */
public class StockCheckActivity extends BaseActivity {

    @Override
    public String getPageName() {
        return getString(R.string.page_check_main);
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_stock_check);
        ((TextView) findViewById(R.id.title)).setText("库存盘点");
        (findViewById(R.id.num)).setVisibility(View.INVISIBLE);
        findViewById(R.id.check_task_list_btn).setOnClickListener(this);
        findViewById(R.id.check_diff_report_btn).setOnClickListener(this);
        findViewById(R.id.btn_stockLocalDept).setOnClickListener(this);
        findViewById(R.id.stock_check_back_btn).setOnClickListener(this);
        findViewById(R.id.btn_check_task_create).setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        Intent intent;
        switch (v.getId()) {
            case R.id.btn_check_task_create:
                //盘点任务创建
                toActivity(CheckTaskCreateActivity.class);
                break;
            case R.id.check_task_list_btn:
                //盘点任务列表
                intent = new Intent(StockCheckActivity.this, CheckTaskActivity.class);
                startActivity(intent);
                break;
            case R.id.check_diff_report_btn:
                //盘点差异报告
                intent = new Intent(StockCheckActivity.this, DifferReportActivity.class);
                startActivity(intent);
                break;
            case R.id.btn_stockLocalDept:
                //入库至本部门
                toActivity(StockInLocalDeptActivity.class);
                break;
            case R.id.stock_check_back_btn:
                finish();
                break;
            default:
                break;
        }
    }
}
